//
//  AreaChooseCell.m
//  QRMaster
//
//  Created by myApple on 16/3/2.
//  Copyright © 2016年 myApple. All rights reserved.
//

#import "AreaChooseCell.h"

@interface AreaChooseCell()
{
    UILabel * areaLabel;
    UILabel * areaCodeLabel;
}

@end

@implementation AreaChooseCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self prepareView];
    }
    return self;
}

-(void)prepareView
{
    float ScreenWidth = [UIScreen mainScreen].bounds.size.width;
    float x = 20;
    float y = 10;
    float width = ScreenWidth - x - 60;
    float height = 20;
    
    areaLabel = [[UILabel alloc]initWithFrame:CGRectMake(x, y, width, height)];
    areaLabel.font = [UIFont systemFontOfSize:16.0];
    [self.contentView addSubview:areaLabel];
    
    x = ScreenWidth - 60;
    y = 10;
    height = 20;
    width = 60;
    areaCodeLabel = [[UILabel alloc]initWithFrame:CGRectMake(x, y, width, height)];
    areaCodeLabel.font = [UIFont systemFontOfSize:16.0];
    [self.contentView addSubview:areaCodeLabel];
}


-(void)setAreaCodeIdString:(NSString *)areaCodeIdString
{
    _areaCodeIdString = areaCodeIdString;
    areaCodeLabel.text = areaCodeIdString;
}

-(void)setAreaNameString:(NSString *)areaNameString
{
    _areaNameString = areaNameString;
    areaLabel.text = areaNameString;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
